home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / emacs_src_18_58.lha / emacs-18.58 / lisp / texinfo.elc < prev    next >
Text File  |  1992-02-21  |  6KB  |  85 lines

  1.  
  2. (defvar texinfo-mode-syntax-table nil)
  3.  
  4. (if texinfo-mode-syntax-table nil (setq texinfo-mode-syntax-table (make-syntax-table)) (modify-syntax-entry 34 " " texinfo-mode-syntax-table) (modify-syntax-entry 92 " " texinfo-mode-syntax-table) (modify-syntax-entry 64 "\\" texinfo-mode-syntax-table) (modify-syntax-entry 17 "\\" texinfo-mode-syntax-table) (modify-syntax-entry 91 "(]" texinfo-mode-syntax-table) (modify-syntax-entry 93 ")[" texinfo-mode-syntax-table) (modify-syntax-entry 123 "(}" texinfo-mode-syntax-table) (modify-syntax-entry 125 "){" texinfo-mode-syntax-table) (modify-syntax-entry 39 "w" texinfo-mode-syntax-table))
  5.  
  6. (defvar texinfo-mode-map nil)
  7.  
  8. (if texinfo-mode-map nil (setq texinfo-mode-map (make-sparse-keymap)) (define-key texinfo-mode-map "" (quote texinfo-format-region)) (define-key texinfo-mode-map "" (quote texinfo-show-structure)) (define-key texinfo-mode-map "}" (quote up-list)) (define-key texinfo-mode-map "{" (quote texinfo-insert-braces)) (define-key texinfo-mode-map "v" (quote texinfo-insert-@var)) (define-key texinfo-mode-map "s" (quote texinfo-insert-@samp)) (define-key texinfo-mode-map "n" (quote texinfo-insert-@node)) (define-key texinfo-mode-map "i" (quote texinfo-insert-@item)) (define-key texinfo-mode-map "e" (quote texinfo-insert-@end)) (define-key texinfo-mode-map "d" (quote texinfo-insert-@dfn)) (define-key texinfo-mode-map "c" (quote texinfo-insert-@code)))
  9.  
  10. (defun texinfo-insert-@var nil "\
  11. Insert the string @var in a texinfo buffer." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "@var{}" backward-char] 2))
  12.  
  13. (defun texinfo-insert-@samp nil "\
  14. Insert the string @samp in a texinfo buffer." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "@samp{}" backward-char] 2))
  15.  
  16. (defun texinfo-insert-@node nil "\
  17. Insert the string @node in a texinfo buffer, 
  18. along with a comment indicating the arguments to @node." (interactive) (byte-code "ÀˆÁcˆÂÃ!ˆÄÅ!‡" [nil "@node     
  19. @comment  node-name,  next,  previous,  up" forward-line -1 forward-char 6] 3))
  20.  
  21. (defun texinfo-insert-@item nil "\
  22. Insert the string @item in a texinfo buffer." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "@item" newline] 2))
  23.  
  24. (defun texinfo-insert-@end nil "\
  25. Insert the string @end in a texinfo buffer." (interactive) (byte-code "ÀˆÁc‡" [nil "@end "] 1))
  26.  
  27. (defun texinfo-insert-@dfn nil "\
  28. Insert the string @dfn in a texinfo buffer." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "@dfn{}" backward-char] 2))
  29.  
  30. (defun texinfo-insert-@code nil "\
  31. Insert the string @code in a texinfo buffer." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "@code{}" backward-char] 2))
  32.  
  33. (defun texinfo-insert-braces nil "\
  34. Make a pair of braces and be poised to type inside of them.
  35. Use \\[up-list] to move forward out of the braces." (interactive) (byte-code "ÀˆÁcˆÂ ‡" [nil "{}" backward-char] 2))
  36.  
  37. (defun texinfo-mode nil "\
  38. Major mode for editing texinfo files.
  39.  
  40.   It has these extra commands:
  41. \\{texinfo-mode-map}
  42.  
  43.   These are files that are used as input for TeX to make printed manuals
  44. and also to be turned into Info files by \\[texinfo-format-buffer].
  45. These files must be written in a very restricted and modified version
  46. of TeX input format.
  47.  
  48.   Editing commands are like text-mode except that the syntax table is
  49. set up so expression commands skip Texinfo bracket groups.  To see
  50. what the Info version of a region of the Texinfo file will look like,
  51. use \\[texinfo-format-region].  This command runs Info on the current region
  52. of the Texinfo file and formats it properly.
  53.  
  54.   You can show the structure of a Texinfo file with \\[texinfo-show-structure].
  55. This command shows the structure of a Texinfo file by listing the
  56. lines with the @-sign commands for @node, @chapter, @section and the
  57. like.  These lines are displayed in another window called the *Occur*
  58. window.  In that window, you can position the cursor over one of the
  59. lines and use \\[occur-mode-goto-occurrence], to jump to the
  60. corresponding spot in the Texinfo file.
  61.  
  62.   In addition, Texinfo mode provides commands that insert various
  63. frequently used @-sign commands into the buffer.  You can use these
  64. commands to save keystrokes.  And you can insert balanced braces with
  65. \\[texinfo-insert-braces] and later use the command \\[up-list] to
  66. move forward past the closing brace.
  67.  
  68. Entering Texinfo mode calls the value of text-mode-hook, and then the
  69. value of texinfo-mode-hook." (interactive) (byte-code "͈ΠˆÏ‰ˆÐ‰ˆÑ
  70. !ˆÒ !ˆ‰ˆÓÆ!ˆÇ‰ˆÓÈ!ˆÔP‰ˆÓÉ!ˆÔ    P‰    ˆÓÊ!ˆÕ‰
  71. ˆÓË!ˆÖ‰ ˆÓÌ!ˆ×‰ ˆØÙÚ\"‡" [mode-name major-mode texinfo-mode-map texinfo-mode-syntax-table local-abbrev-table text-mode-abbrev-table require-final-newline t paragraph-separate paragraph-start fill-column comment-start comment-start-skip nil kill-all-local-variables "Texinfo" texinfo-mode use-local-map set-syntax-table make-local-variable "^\\|^@[a-zA-Z]*[ 
  72. ]\\|" 72 "@c " "@c +" run-hooks text-mode-hook texinfo-mode-hook] 12))
  73.  
  74. (defvar texinfo-heading-pattern "^@\\(chapter\\|unnum\\|appendix\\|sect\\|sub\\|heading\\|major\\|node\\)" "\
  75. This is a regular expression to match Texinfo lines that are chapter
  76. or sections headings or like such.")
  77.  
  78. (defun texinfo-show-structure nil "\
  79. Show the structure of a Texinfo file by listing the lines with the
  80. @-sign commands for @node, @chapter, @section and the like.  Lines
  81. with structuring commands in them are displayed in another window
  82. called the *Occur* window.  In that window, you can position the
  83. cursor over one of the lines and use \\[occur-mode-goto-occurrence],
  84. to jump to the corresponding spot in the Texinfo file." (interactive) (byte-code "ÁˆŠebˆÂ!)ˆÃÄ!ˆebˆÅÆ!‡" [texinfo-heading-pattern nil occur pop-to-buffer "*Occur*" flush-lines "-----"] 4))
  85.